<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ng-repate = (k,v) in data </title>
    <script src="../angular.js"></script>
</head>
<body>
    <div ng-app="gg" ng-controller="ctrl">
        <ul>
            <!--ng-repate = (k,v) in data -->
            <!--{{k ==0 ? 'color: red': '' }}-->
            <!-- 第一行{{$first ? 'color:red' : ''}}-->
            <!--最后一行{{$last ? 'color:green': ''}}-->
            <!--$middle 中间的 ，$even 偶数行，  $odd 奇数行-->
            <li ng-repeat="(k,v) in data" style="{{$first ? 'color:red' : ''}} ">
                {{k}}

                名字：{{v.name}}
                年龄：{{v.age}}
            </li>
        </ul>
    </div>

    <script>
        var mod = angular.module('gg', []);
        mod.controller('ctrl', ['$scope', function ($scope) {
            $scope.data = [
                {'name' : 'gg', 'age' : 22},
                {'name' : 'qc', 'age' : 18},
                {'name' : 'baobao', 'age' : 2},
                {'name' : 'who', 'age' : 100000},
            ]
        }])
    </script>
</body>

</html>